<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Library Evolutionary Algorithms for Clustering (LEAC): gaselect Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="leac_logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Library Evolutionary Algorithms for Clustering (LEAC)
   &#160;<span id="projectnumber">Version 1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">gaselect Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Chromosome selection method in genetic algorithms.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ae9cfd02b23815a3c1291b4adb0b7658a"><td class="memTemplParams" colspan="2">template&lt;typename T_PROBABILITY , typename T_INTIDX &gt; </td></tr>
<tr class="memitem:ae9cfd02b23815a3c1291b4adb0b7658a"><td class="memTemplItemLeft" align="right" valign="top">T_INTIDX&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacegaselect.html#ae9cfd02b23815a3c1291b4adb0b7658a">getIdxRouletteWheel</a> (const std::vector&lt; T_PROBABILITY &gt; &amp;aivectorrt_probDist, const T_INTIDX aiuintidx_begin)</td></tr>
<tr class="memdesc:ae9cfd02b23815a3c1291b4adb0b7658a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Selection a random index in [IdxBegin,n].  <a href="#ae9cfd02b23815a3c1291b4adb0b7658a">More...</a><br /></td></tr>
<tr class="separator:ae9cfd02b23815a3c1291b4adb0b7658a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c112d058e3c23e488ec889223dc6b5e"><td class="memTemplParams" colspan="2">template&lt;typename INPUT_ITERATOR , typename FITNESSOPERATION &gt; </td></tr>
<tr class="memitem:a8c112d058e3c23e488ec889223dc6b5e"><td class="memTemplItemLeft" align="right" valign="top">INPUT_ITERATOR&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacegaselect.html#a8c112d058e3c23e488ec889223dc6b5e">tournament</a> (const INPUT_ITERATOR aiiterator_instfirst, const INPUT_ITERATOR aiiterator_instlast, const <a class="el" href="common_8hpp.html#a3f6c33fb604556cdc425e7aa2289d009">uintidx</a> aiuintidx_orderTournament, const FITNESSOPERATION fitness_func)</td></tr>
<tr class="separator:a8c112d058e3c23e488ec889223dc6b5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Chromosome selection method in genetic algorithms. </p>
<dl class="section version"><dt>Version</dt><dd>1.0 </dd></dl>
<dl class="section date"><dt>Date</dt><dd>2015-2017 </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>GPLv3 license </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae9cfd02b23815a3c1291b4adb0b7658a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae9cfd02b23815a3c1291b4adb0b7658a">&#9670;&nbsp;</a></span>getIdxRouletteWheel()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T_PROBABILITY , typename T_INTIDX &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T_INTIDX gaselect::getIdxRouletteWheel </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; T_PROBABILITY &gt; &amp;&#160;</td>
          <td class="paramname"><em>aivectorrt_probDist</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const T_INTIDX&#160;</td>
          <td class="paramname"><em>aiuintidx_begin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Selection a random index in [IdxBegin,n]. </p>
<p>Selection a which is proportional to its probability dstribution by aivectorrt_probDist, utilizes for roulette wheel selection method </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aivectorrt_probDist</td><td>a acumulate probability dstribution in [0,1] </td></tr>
    <tr><td class="paramname">aiuintidx_begin</td><td>a unsigned integer index where begin index to select</td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><span class="comment">//COPY POPULATION TO MATING POOL FOR ROULETTE WHEEL--------------------------</span></div><div class="line"></div><div class="line"><span class="keywordflow">for</span> ( <span class="keyword">auto</span>&amp;&amp; lchrom_iter: lvectorchrom_matingPool) {</div><div class="line"></div><div class="line">   <a class="code" href="common_8hpp.html#a3f6c33fb604556cdc425e7aa2289d009">uintidx</a> luiidx_chrom = </div><div class="line">   <a class="code" href="namespacegaselect.html#ae9cfd02b23815a3c1291b4adb0b7658a">gaselect::getIdxRouletteWheel</a></div><div class="line">   (lvectorT_probDistRouletteWheel,</div><div class="line">    <a class="code" href="common_8hpp.html#a3f6c33fb604556cdc425e7aa2289d009">uintidx</a>(0)</div><div class="line">   );</div><div class="line"></div><div class="line">   lchrom_iter = lvectorchrom_population.at(luiidx_chrom);</div><div class="line"></div><div class="line">}</div></div><!-- fragment --> 
<p class="definition">Definition at line <a class="el" href="ga__selection_8hpp_source.html#l00063">63</a> of file <a class="el" href="ga__selection_8hpp_source.html">ga_selection.hpp</a>.</p>

<p class="reference">References <a class="el" href="random__ext_8hpp_source.html#l00063">gmt19937_eng</a>.</p>

<p class="reference">Referenced by <a class="el" href="cga__vklabel_8hpp_source.html#l00067">eac::cga_vklabel()</a>, <a class="el" href="clustering__vksubclusterbinary_8hpp_source.html#l00072">eac::clustering_genetic()</a>, <a class="el" href="feac__vklabel_8hpp_source.html#l00081">eac::feca_vklabel()</a>, <a class="el" href="gaclustering__fklabel_8hpp_source.html#l00067">eac::gaclustering_fklabel()</a>, <a class="el" href="gaclustering__vktreebinary_8hpp_source.html#l00070">eac::gaclustering_vktreebinary()</a>, <a class="el" href="gagr__fkcentroid_8hpp_source.html#l00070">eac::gagr_fkcentroid()</a>, <a class="el" href="gas__fkcentroid_8hpp_source.html#l00070">eac::gas_fkcentroid()</a>, <a class="el" href="gca__fkmedoid_8hpp_source.html#l00066">eac::gca_fkmedoid()</a>, <a class="el" href="gcuk__vkcentroid_8hpp_source.html#l00072">eac::gcuk_vkcentroid()</a>, <a class="el" href="probability__selection_8hpp_source.html#l00064">prob::getIdxPairUnlikeRoulette()</a>, <a class="el" href="probability__selection_8hpp_source.html#l00101">prob::getIdxVectorRoulette()</a>, <a class="el" href="gga__vklabel_8hpp_source.html#l00073">eac::gga_vklabel()</a>, <a class="el" href="igka__fklabel_8hpp_source.html#l00080">eac::igka_fklabel()</a>, <a class="el" href="kga__fkcentroid_8hpp_source.html#l00072">eac::kga_fkcentroid()</a>, <a class="el" href="ga__clustering__operator_8hpp_source.html#l02191">gaclusteringop::MO1()</a>, <a class="el" href="ga__clustering__operator_8hpp_source.html#l02589">gaclusteringop::MO2()</a>, <a class="el" href="ga__integer__operator_8hpp_source.html#l00587">gaintegerop::mutationgka()</a>, and <a class="el" href="tgca__vkcentroid_8hpp_source.html#l00176">eac::tgca_vkcentroid()</a>.</p>

</div>
</div>
<a id="a8c112d058e3c23e488ec889223dc6b5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c112d058e3c23e488ec889223dc6b5e">&#9670;&nbsp;</a></span>tournament()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename INPUT_ITERATOR , typename FITNESSOPERATION &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">INPUT_ITERATOR gaselect::tournament </td>
          <td>(</td>
          <td class="paramtype">const INPUT_ITERATOR&#160;</td>
          <td class="paramname"><em>aiiterator_instfirst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const INPUT_ITERATOR&#160;</td>
          <td class="paramname"><em>aiiterator_instlast</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="common_8hpp.html#a3f6c33fb604556cdc425e7aa2289d009">uintidx</a>&#160;</td>
          <td class="paramname"><em>aiuintidx_orderTournament</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const FITNESSOPERATION&#160;</td>
          <td class="paramname"><em>fitness_func</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="ga__selection_8hpp_source.html#l00145">145</a> of file <a class="el" href="ga__selection_8hpp_source.html">ga_selection.hpp</a>.</p>

<p class="reference">References <a class="el" href="random__ext_8hpp_source.html#l00063">gmt19937_eng</a>, and <a class="el" href="inparamclustering__getparameter_8hpp_source.html#l00503">inout::li_i</a>.</p>

<p class="reference">Referenced by <a class="el" href="hka__fkmedoid_8hpp_source.html#l00065">eac::hka_fkmedoid()</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 19 2019 08:58:35 for Library Evolutionary Algorithms for Clustering (LEAC) by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
